﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AUV5.Common;

namespace AUV5.Web
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //clear session
            Session["UserInfo"] = null;
            Session.Clear();
            Session.Abandon();

            //clear Cookie
            PageBase.RemoveCookiesByKeyName("UserCookie");


            string path = string.IsNullOrEmpty(Request["path"]) ? "Default.aspx" : Request["path"];
            //Response.Redirect(path);
            this.ClientScript.RegisterStartupScript(this.GetType(), "", string.Format("top.location='{0}';", path), true);
        }
    }
}